--
-- PostgreSQL database dump
--

-- Started on 2010-06-27 23:45:21

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 1933 (class 1262 OID 26578)
-- Name: hegeprosoft; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE hegeprosoft WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'Spanish_Colombia.1252' LC_CTYPE = 'Spanish_Colombia.1252';


ALTER DATABASE hegeprosoft OWNER TO postgres;

\connect hegeprosoft

SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

--
-- TOC entry 358 (class 2612 OID 16386)
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
--

CREATE PROCEDURAL LANGUAGE plpgsql;


ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- TOC entry 1545 (class 1259 OID 26603)
-- Dependencies: 3
-- Name: actividad; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE actividad (
    act_idactividad integer NOT NULL,
    act_nombreactividad character varying(30) NOT NULL,
    act_metodologia character varying(20),
    act_fase integer NOT NULL,
    act_descripcion character varying(500)
);


ALTER TABLE public.actividad OWNER TO postgres;

--
-- TOC entry 1564 (class 1259 OID 26681)
-- Dependencies: 1545 3
-- Name: actividad_act_idactividad_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE actividad_act_idactividad_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.actividad_act_idactividad_seq OWNER TO postgres;

--
-- TOC entry 1936 (class 0 OID 0)
-- Dependencies: 1564
-- Name: actividad_act_idactividad_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE actividad_act_idactividad_seq OWNED BY actividad.act_idactividad;


--
-- TOC entry 1937 (class 0 OID 0)
-- Dependencies: 1564
-- Name: actividad_act_idactividad_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('actividad_act_idactividad_seq', 8, true);


--
-- TOC entry 1546 (class 1259 OID 26609)
-- Dependencies: 3
-- Name: artefactos; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE artefactos (
    art_idartefacto integer NOT NULL,
    art_nombreartefacto character varying(20) NOT NULL,
    art_metodologia character varying(20),
    art_actividad integer NOT NULL,
    art_descripcion character varying(500)
);


ALTER TABLE public.artefactos OWNER TO postgres;

--
-- TOC entry 1565 (class 1259 OID 26683)
-- Dependencies: 3 1546
-- Name: artefactos_art_idartefacto_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE artefactos_art_idartefacto_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.artefactos_art_idartefacto_seq OWNER TO postgres;

--
-- TOC entry 1938 (class 0 OID 0)
-- Dependencies: 1565
-- Name: artefactos_art_idartefacto_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE artefactos_art_idartefacto_seq OWNED BY artefactos.art_idartefacto;


--
-- TOC entry 1939 (class 0 OID 0)
-- Dependencies: 1565
-- Name: artefactos_art_idartefacto_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('artefactos_art_idartefacto_seq', 7, true);


--
-- TOC entry 1547 (class 1259 OID 26615)
-- Dependencies: 3
-- Name: configuracioncursoactividad; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE configuracioncursoactividad (
    cfc_idconfiguracioncurso integer NOT NULL,
    cfc_curso character varying(12) NOT NULL,
    cfc_actividad integer NOT NULL,
    cfc_roles character varying(50),
    cfc_fechaentrega timestamp without time zone
);


ALTER TABLE public.configuracioncursoactividad OWNER TO postgres;

--
-- TOC entry 1548 (class 1259 OID 26618)
-- Dependencies: 3
-- Name: configuracioncursoartecfacto; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE configuracioncursoartecfacto (
    cfc_idconfiguracioncurso integer NOT NULL,
    cfc_curso character varying(12) NOT NULL,
    cfc_artefacto integer NOT NULL,
    cfc_roles character varying(50),
    cfc_fechaentrega timestamp without time zone
);


ALTER TABLE public.configuracioncursoartecfacto OWNER TO postgres;

--
-- TOC entry 1549 (class 1259 OID 26621)
-- Dependencies: 3
-- Name: configuracioncursofase; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE configuracioncursofase (
    cfc_idconfiguracioncurso integer NOT NULL,
    cfc_curso character varying(12) NOT NULL,
    cfc_fase integer NOT NULL,
    cfc_roles character varying(50),
    cfc_fechaentrega timestamp without time zone
);


ALTER TABLE public.configuracioncursofase OWNER TO postgres;

--
-- TOC entry 1550 (class 1259 OID 26624)
-- Dependencies: 3
-- Name: curso; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE curso (
    cur_materia character varying(50) NOT NULL,
    cur_metodologia character varying(30),
    cur_idcurso character varying(12) NOT NULL,
    cur_cedulaprofesor character varying(12)
);


ALTER TABLE public.curso OWNER TO postgres;

--
-- TOC entry 1551 (class 1259 OID 26627)
-- Dependencies: 3
-- Name: estudiante; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE estudiante (
    est_codigoestudiante character varying(10) NOT NULL,
    est_nombreestudiante character varying(30),
    est_apellidoestudiante character varying(30),
    est_grupotrabajo integer NOT NULL,
    est_loginusuario character varying(20) NOT NULL,
    est_cursoestudiante character varying(12) NOT NULL
);


ALTER TABLE public.estudiante OWNER TO postgres;

--
-- TOC entry 1552 (class 1259 OID 26630)
-- Dependencies: 3
-- Name: fase; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE fase (
    fas_idfase integer NOT NULL,
    fas_nombrefase character varying(20) NOT NULL,
    fas_metodologia character varying(30),
    fas_descripcion character varying(500)
);


ALTER TABLE public.fase OWNER TO postgres;

--
-- TOC entry 1566 (class 1259 OID 26685)
-- Dependencies: 3 1552
-- Name: fase_fas_idfase_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE fase_fas_idfase_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.fase_fas_idfase_seq OWNER TO postgres;

--
-- TOC entry 1940 (class 0 OID 0)
-- Dependencies: 1566
-- Name: fase_fas_idfase_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE fase_fas_idfase_seq OWNED BY fase.fas_idfase;


--
-- TOC entry 1941 (class 0 OID 0)
-- Dependencies: 1566
-- Name: fase_fas_idfase_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('fase_fas_idfase_seq', 16, true);


--
-- TOC entry 1553 (class 1259 OID 26636)
-- Dependencies: 3
-- Name: grupotrabajo; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE grupotrabajo (
    grt_idgrupotrabajo integer NOT NULL,
    grt_nombregrupotrabajo character varying(20) NOT NULL,
    grt_curso character varying(10) NOT NULL,
    grt_notadefinitiva integer
);


ALTER TABLE public.grupotrabajo OWNER TO postgres;

--
-- TOC entry 1567 (class 1259 OID 26687)
-- Dependencies: 1553 3
-- Name: grupotrabajo_grt_idgrupotrabajo_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE grupotrabajo_grt_idgrupotrabajo_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.grupotrabajo_grt_idgrupotrabajo_seq OWNER TO postgres;

--
-- TOC entry 1942 (class 0 OID 0)
-- Dependencies: 1567
-- Name: grupotrabajo_grt_idgrupotrabajo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE grupotrabajo_grt_idgrupotrabajo_seq OWNED BY grupotrabajo.grt_idgrupotrabajo;


--
-- TOC entry 1943 (class 0 OID 0)
-- Dependencies: 1567
-- Name: grupotrabajo_grt_idgrupotrabajo_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('grupotrabajo_grt_idgrupotrabajo_seq', 6, true);


--
-- TOC entry 1554 (class 1259 OID 26639)
-- Dependencies: 3
-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE material (
    idmaterial integer NOT NULL,
    mat_nombrematerial character varying(255) NOT NULL,
    mat_ruta character varying(90) NOT NULL,
    mat_descripcionmaterial character varying(500),
    mat_fasematerial integer,
    mat_artefactomaterial integer,
    mat_actividad integer
);


ALTER TABLE public.material OWNER TO postgres;

--
-- TOC entry 1568 (class 1259 OID 26689)
-- Dependencies: 3 1554
-- Name: material_idmaterial_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE material_idmaterial_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.material_idmaterial_seq OWNER TO postgres;

--
-- TOC entry 1944 (class 0 OID 0)
-- Dependencies: 1568
-- Name: material_idmaterial_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE material_idmaterial_seq OWNED BY material.idmaterial;


--
-- TOC entry 1945 (class 0 OID 0)
-- Dependencies: 1568
-- Name: material_idmaterial_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('material_idmaterial_seq', 19, true);


--
-- TOC entry 1555 (class 1259 OID 26645)
-- Dependencies: 3
-- Name: metodologia; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE metodologia (
    met_id integer NOT NULL,
    met_nombre character varying(50),
    met_descripcion character varying(400)
);


ALTER TABLE public.metodologia OWNER TO postgres;

--
-- TOC entry 1569 (class 1259 OID 26691)
-- Dependencies: 1555 3
-- Name: metodologia_met_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE metodologia_met_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.metodologia_met_id_seq OWNER TO postgres;

--
-- TOC entry 1946 (class 0 OID 0)
-- Dependencies: 1569
-- Name: metodologia_met_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE metodologia_met_id_seq OWNED BY metodologia.met_id;


--
-- TOC entry 1947 (class 0 OID 0)
-- Dependencies: 1569
-- Name: metodologia_met_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('metodologia_met_id_seq', 1, true);


--
-- TOC entry 1556 (class 1259 OID 26648)
-- Dependencies: 3
-- Name: modulo; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE modulo (
    mod_idmodulo integer NOT NULL,
    mod_nombremodulo character varying(20) NOT NULL,
    mod_rutamodulo character varying(200) NOT NULL,
    mod_visible character varying(20),
    mod_padre character varying(50),
    mod_numero character varying(100),
    mod_rol character varying(20)
);


ALTER TABLE public.modulo OWNER TO postgres;

--
-- TOC entry 1570 (class 1259 OID 26693)
-- Dependencies: 1556 3
-- Name: modulo_mod_idmodulo_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE modulo_mod_idmodulo_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.modulo_mod_idmodulo_seq OWNER TO postgres;

--
-- TOC entry 1948 (class 0 OID 0)
-- Dependencies: 1570
-- Name: modulo_mod_idmodulo_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE modulo_mod_idmodulo_seq OWNED BY modulo.mod_idmodulo;


--
-- TOC entry 1949 (class 0 OID 0)
-- Dependencies: 1570
-- Name: modulo_mod_idmodulo_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('modulo_mod_idmodulo_seq', 1, false);


--
-- TOC entry 1557 (class 1259 OID 26651)
-- Dependencies: 3
-- Name: permiso; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE permiso (
    pem_idpermiso integer NOT NULL,
    pem_usuario character varying(255) NOT NULL,
    pem_modulo integer NOT NULL,
    mod_tipo character varying(10)
);


ALTER TABLE public.permiso OWNER TO postgres;

--
-- TOC entry 1571 (class 1259 OID 26695)
-- Dependencies: 3 1557
-- Name: permiso_pem_idpermiso_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE permiso_pem_idpermiso_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.permiso_pem_idpermiso_seq OWNER TO postgres;

--
-- TOC entry 1950 (class 0 OID 0)
-- Dependencies: 1571
-- Name: permiso_pem_idpermiso_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE permiso_pem_idpermiso_seq OWNED BY permiso.pem_idpermiso;


--
-- TOC entry 1951 (class 0 OID 0)
-- Dependencies: 1571
-- Name: permiso_pem_idpermiso_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('permiso_pem_idpermiso_seq', 1, false);


--
-- TOC entry 1558 (class 1259 OID 26654)
-- Dependencies: 3
-- Name: profesor; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE profesor (
    prf_cedulaprofesor character varying(12) NOT NULL,
    prf_nombreprofesor character varying(30),
    prf_apellidoprofesor character varying(30),
    prf_loginusuario character varying(10) NOT NULL,
    prf_cursoprofesor character varying(10) NOT NULL
);


ALTER TABLE public.profesor OWNER TO postgres;

--
-- TOC entry 1559 (class 1259 OID 26657)
-- Dependencies: 3
-- Name: reporteentregas; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reporteentregas (
    rpe_idreporte integer NOT NULL,
    rpe_grupotrabajo integer NOT NULL,
    rpe_actividad integer NOT NULL,
    rpe_fecha timestamp without time zone,
    rpe_observcionreporteentrega character varying(500)
);


ALTER TABLE public.reporteentregas OWNER TO postgres;

--
-- TOC entry 1572 (class 1259 OID 26697)
-- Dependencies: 3 1559
-- Name: reporteentregas_rpe_idreporte_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE reporteentregas_rpe_idreporte_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.reporteentregas_rpe_idreporte_seq OWNER TO postgres;

--
-- TOC entry 1952 (class 0 OID 0)
-- Dependencies: 1572
-- Name: reporteentregas_rpe_idreporte_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE reporteentregas_rpe_idreporte_seq OWNED BY reporteentregas.rpe_idreporte;


--
-- TOC entry 1953 (class 0 OID 0)
-- Dependencies: 1572
-- Name: reporteentregas_rpe_idreporte_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('reporteentregas_rpe_idreporte_seq', 1, false);


--
-- TOC entry 1560 (class 1259 OID 26663)
-- Dependencies: 3
-- Name: reportenotas; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE reportenotas (
    rpn_idreportenotas integer NOT NULL,
    rpn_actividad integer NOT NULL,
    rpn_profesor character varying(12) NOT NULL,
    rpn_nota character varying(255),
    rpn_observaciones character varying(500),
    rpn_grupotrabajo integer NOT NULL,
    reporteentrega integer NOT NULL
);


ALTER TABLE public.reportenotas OWNER TO postgres;

--
-- TOC entry 1561 (class 1259 OID 26669)
-- Dependencies: 3
-- Name: roles; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE roles (
    rol_idroles integer NOT NULL,
    rol_nombreroles character varying(20) NOT NULL,
    rol_actividadroles character varying(20),
    rol_descripcionroles character varying(500)
);


ALTER TABLE public.roles OWNER TO postgres;

--
-- TOC entry 1573 (class 1259 OID 26699)
-- Dependencies: 3 1561
-- Name: roles_rol_idroles_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE roles_rol_idroles_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.roles_rol_idroles_seq OWNER TO postgres;

--
-- TOC entry 1954 (class 0 OID 0)
-- Dependencies: 1573
-- Name: roles_rol_idroles_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE roles_rol_idroles_seq OWNED BY roles.rol_idroles;


--
-- TOC entry 1955 (class 0 OID 0)
-- Dependencies: 1573
-- Name: roles_rol_idroles_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('roles_rol_idroles_seq', 1, false);


--
-- TOC entry 1562 (class 1259 OID 26675)
-- Dependencies: 3
-- Name: tipousuario; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE tipousuario (
    tpu_id integer NOT NULL,
    tpu_nombre character varying(20) NOT NULL
);


ALTER TABLE public.tipousuario OWNER TO postgres;

--
-- TOC entry 1574 (class 1259 OID 26701)
-- Dependencies: 3 1562
-- Name: tipousuario_tpu_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE tipousuario_tpu_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.tipousuario_tpu_id_seq OWNER TO postgres;

--
-- TOC entry 1956 (class 0 OID 0)
-- Dependencies: 1574
-- Name: tipousuario_tpu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE tipousuario_tpu_id_seq OWNED BY tipousuario.tpu_id;


--
-- TOC entry 1957 (class 0 OID 0)
-- Dependencies: 1574
-- Name: tipousuario_tpu_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('tipousuario_tpu_id_seq', 1, false);


--
-- TOC entry 1563 (class 1259 OID 26678)
-- Dependencies: 3
-- Name: usuario; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE usuario (
    usu_loginusuario character varying(10) NOT NULL,
    usu_contrasenausuario character varying(20) NOT NULL,
    usu_tipousuario character varying(15) NOT NULL
);


ALTER TABLE public.usuario OWNER TO postgres;

--
-- TOC entry 1852 (class 2604 OID 26703)
-- Dependencies: 1564 1545
-- Name: act_idactividad; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE actividad ALTER COLUMN act_idactividad SET DEFAULT nextval('actividad_act_idactividad_seq'::regclass);


--
-- TOC entry 1853 (class 2604 OID 26704)
-- Dependencies: 1565 1546
-- Name: art_idartefacto; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE artefactos ALTER COLUMN art_idartefacto SET DEFAULT nextval('artefactos_art_idartefacto_seq'::regclass);


--
-- TOC entry 1854 (class 2604 OID 26705)
-- Dependencies: 1566 1552
-- Name: fas_idfase; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE fase ALTER COLUMN fas_idfase SET DEFAULT nextval('fase_fas_idfase_seq'::regclass);


--
-- TOC entry 1855 (class 2604 OID 26706)
-- Dependencies: 1567 1553
-- Name: grt_idgrupotrabajo; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE grupotrabajo ALTER COLUMN grt_idgrupotrabajo SET DEFAULT nextval('grupotrabajo_grt_idgrupotrabajo_seq'::regclass);


--
-- TOC entry 1856 (class 2604 OID 26707)
-- Dependencies: 1568 1554
-- Name: idmaterial; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE material ALTER COLUMN idmaterial SET DEFAULT nextval('material_idmaterial_seq'::regclass);


--
-- TOC entry 1857 (class 2604 OID 26708)
-- Dependencies: 1569 1555
-- Name: met_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE metodologia ALTER COLUMN met_id SET DEFAULT nextval('metodologia_met_id_seq'::regclass);


--
-- TOC entry 1858 (class 2604 OID 26709)
-- Dependencies: 1570 1556
-- Name: mod_idmodulo; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE modulo ALTER COLUMN mod_idmodulo SET DEFAULT nextval('modulo_mod_idmodulo_seq'::regclass);


--
-- TOC entry 1859 (class 2604 OID 26710)
-- Dependencies: 1571 1557
-- Name: pem_idpermiso; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE permiso ALTER COLUMN pem_idpermiso SET DEFAULT nextval('permiso_pem_idpermiso_seq'::regclass);


--
-- TOC entry 1860 (class 2604 OID 26711)
-- Dependencies: 1572 1559
-- Name: rpe_idreporte; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE reporteentregas ALTER COLUMN rpe_idreporte SET DEFAULT nextval('reporteentregas_rpe_idreporte_seq'::regclass);


--
-- TOC entry 1861 (class 2604 OID 26712)
-- Dependencies: 1573 1561
-- Name: rol_idroles; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE roles ALTER COLUMN rol_idroles SET DEFAULT nextval('roles_rol_idroles_seq'::regclass);


--
-- TOC entry 1862 (class 2604 OID 26713)
-- Dependencies: 1574 1562
-- Name: tpu_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE tipousuario ALTER COLUMN tpu_id SET DEFAULT nextval('tipousuario_tpu_id_seq'::regclass);


--
-- TOC entry 1912 (class 0 OID 26603)
-- Dependencies: 1545
-- Data for Name: actividad; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (4, 'Planificacion', ' XP', 3, 'Actividad Fase Exploracion');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (5, 'DiseÃ±o', 'XP', 4, 'Actividad Fase Planificacion');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (6, 'we', '', 8, 'â€‹adg');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (7, 'we', 'XP', 8, 'â€‹adg');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (8, 'we', 'XP', 8, 'â€‹adg');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (1, 'Modelo del Negocio', 'RUP', 1, 'actividad fase inicio');
INSERT INTO actividad (act_idactividad, act_nombreactividad, act_metodologia, act_fase, act_descripcion) VALUES (2, 'Requerimiento', 'RUP', 1, 'Activida Fase Inicio');


--
-- TOC entry 1913 (class 0 OID 26609)
-- Dependencies: 1546
-- Data for Name: artefactos; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO artefactos (art_idartefacto, art_nombreartefacto, art_metodologia, art_actividad, art_descripcion) VALUES (2, 'Historias de Usuario', 'XP', 4, 'act2');
INSERT INTO artefactos (art_idartefacto, art_nombreartefacto, art_metodologia, art_actividad, art_descripcion) VALUES (1, 'Casos de USo', 'RUP', 1, 'act');
INSERT INTO artefactos (art_idartefacto, art_nombreartefacto, art_metodologia, art_actividad, art_descripcion) VALUES (7, 'dfsa', 'XP', 2, 'â€‹');


--
-- TOC entry 1914 (class 0 OID 26615)
-- Dependencies: 1547
-- Data for Name: configuracioncursoactividad; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO configuracioncursoactividad (cfc_idconfiguracioncurso, cfc_curso, cfc_actividad, cfc_roles, cfc_fechaentrega) VALUES (1, '750805M', 2, 'analista', NULL);
INSERT INTO configuracioncursoactividad (cfc_idconfiguracioncurso, cfc_curso, cfc_actividad, cfc_roles, cfc_fechaentrega) VALUES (1, '750805M', 2, 'analista tester', '2001-05-05 00:00:00');


--
-- TOC entry 1915 (class 0 OID 26618)
-- Dependencies: 1548
-- Data for Name: configuracioncursoartecfacto; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO configuracioncursoartecfacto (cfc_idconfiguracioncurso, cfc_curso, cfc_artefacto, cfc_roles, cfc_fechaentrega) VALUES (1, '750805M', 2, 'lider, desarrollador', '2001-05-05 00:00:00');


--
-- TOC entry 1916 (class 0 OID 26621)
-- Dependencies: 1549
-- Data for Name: configuracioncursofase; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO configuracioncursofase (cfc_idconfiguracioncurso, cfc_curso, cfc_fase, cfc_roles, cfc_fechaentrega) VALUES (1, '750805M', 1, 'lider', '2001-05-05 00:00:00');


--
-- TOC entry 1917 (class 0 OID 26624)
-- Dependencies: 1550
-- Data for Name: curso; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO curso (cur_materia, cur_metodologia, cur_idcurso, cur_cedulaprofesor) VALUES ('DesarrolloII', 'RUP', '750806M', '1130667042');
INSERT INTO curso (cur_materia, cur_metodologia, cur_idcurso, cur_cedulaprofesor) VALUES ('DesarrolloII', 'XP', '788801M', '1123455');
INSERT INTO curso (cur_materia, cur_metodologia, cur_idcurso, cur_cedulaprofesor) VALUES ('Desarrollo I', 'XP', '750805M', '113088888');
INSERT INTO curso (cur_materia, cur_metodologia, cur_idcurso, cur_cedulaprofesor) VALUES ('Desarrollo para la ingenieria', 'RUP', '754585M', '1130667042');
INSERT INTO curso (cur_materia, cur_metodologia, cur_idcurso, cur_cedulaprofesor) VALUES ('DSg', 'Cristal', '45', '1123455');


--
-- TOC entry 1918 (class 0 OID 26627)
-- Dependencies: 1551
-- Data for Name: estudiante; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO estudiante (est_codigoestudiante, est_nombreestudiante, est_apellidoestudiante, est_grupotrabajo, est_loginusuario, est_cursoestudiante) VALUES ('200789456', 'Marcela', 'Diaz', 2, 'marcelita', '750805M');
INSERT INTO estudiante (est_codigoestudiante, est_nombreestudiante, est_apellidoestudiante, est_grupotrabajo, est_loginusuario, est_cursoestudiante) VALUES ('1130666666', 'Ricardo', 'Torres', 2, 'ricardo', '750806M');


--
-- TOC entry 1919 (class 0 OID 26630)
-- Dependencies: 1552
-- Data for Name: fase; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (1, 'Inicio', 'RUP', 'fase de RUP');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (2, 'Elaboracion', 'RUP', 'fase RUP');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (3, 'Exploracion', 'XP', 'Fase XP');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (4, 'Planificacion', 'XP ', 'Fase XP');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (5, 'dd', 'Cristal', 'â€‹ddddddddd');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (6, 'nueva fase', 'Cristal', 'â€‹fase1');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (7, 'FASe1', 'RUP', 'â€‹Fases :D<br>');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (8, 'FASess', 'RUP', 'â€‹Fases :D<br>');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (9, 'FASess', 'RUP', 'â€‹Fases :D<br>');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (10, 'fase2', '', 'â€‹aaaaaa');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (11, 'fase2', '', '<br>');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (12, 'fase2', '', '<br>');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (13, 's', '', 'â€‹');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (14, 's', 'RUP', 'â€‹');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (15, 'wet', 'XP', 'â€‹gg');
INSERT INTO fase (fas_idfase, fas_nombrefase, fas_metodologia, fas_descripcion) VALUES (16, 'wet', 'XP', 'â€‹gg');


--
-- TOC entry 1920 (class 0 OID 26636)
-- Dependencies: 1553
-- Data for Name: grupotrabajo; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO grupotrabajo (grt_idgrupotrabajo, grt_nombregrupotrabajo, grt_curso, grt_notadefinitiva) VALUES (1, 'Uno', '750805M', NULL);
INSERT INTO grupotrabajo (grt_idgrupotrabajo, grt_nombregrupotrabajo, grt_curso, grt_notadefinitiva) VALUES (2, 'vectorSoft', '750805M', NULL);
INSERT INTO grupotrabajo (grt_idgrupotrabajo, grt_nombregrupotrabajo, grt_curso, grt_notadefinitiva) VALUES (3, 'Gesoft', '750806M', NULL);


--
-- TOC entry 1921 (class 0 OID 26639)
-- Dependencies: 1554
-- Data for Name: material; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (12, 'datos', 'cartaCongreso.pdf', '<br>â€‹', 4, 1, 5);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (2, 'metodologia', 'haaa', 'safdas', 2, 2, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (11, 'Prueba', 'PRUEBA', 'â€‹adfas', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (13, 'Hi', 'Carta_facultad.pdf', 'â€‹sdf', 1, 2, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (14, 'hola', 'Carta_facultad.pdf', 'â€‹afd', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (15, 'hola', 'Carta_facultad.pdf', 'â€‹afdf', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (16, 'hola', 'Carta_facultad.pdf', '<b>â€‹afdf</b>', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (17, 'hola', 'Carta_facultad.pdf', '<b>123</b>', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (18, 'hola', 'Carta_facultad.pdf', '<b>hola</b>', 1, 1, 1);
INSERT INTO material (idmaterial, mat_nombrematerial, mat_ruta, mat_descripcionmaterial, mat_fasematerial, mat_artefactomaterial, mat_actividad) VALUES (19, 'hola', 'Carta_facultad.pdf', '<b>&nbsp;hola hÃ³lka <br></b>', 1, 1, 1);


--
-- TOC entry 1922 (class 0 OID 26645)
-- Dependencies: 1555
-- Data for Name: metodologia; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO metodologia (met_id, met_nombre, met_descripcion) VALUES (1, 'XP', 'agil');
INSERT INTO metodologia (met_id, met_nombre, met_descripcion) VALUES (2, 'RUP', 'extensa');
INSERT INTO metodologia (met_id, met_nombre, met_descripcion) VALUES (3, 'Cristal', 'agil ');


--
-- TOC entry 1923 (class 0 OID 26648)
-- Dependencies: 1556
-- Data for Name: modulo; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1924 (class 0 OID 26651)
-- Dependencies: 1557
-- Data for Name: permiso; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1925 (class 0 OID 26654)
-- Dependencies: 1558
-- Data for Name: profesor; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO profesor (prf_cedulaprofesor, prf_nombreprofesor, prf_apellidoprofesor, prf_loginusuario, prf_cursoprofesor) VALUES ('1130667042', 'Andrea', 'Chaqui', 'andrea', '750806M');
INSERT INTO profesor (prf_cedulaprofesor, prf_nombreprofesor, prf_apellidoprofesor, prf_loginusuario, prf_cursoprofesor) VALUES ('1123455', 'Diana', 'Gutierrez', 'Diana', '788801M');
INSERT INTO profesor (prf_cedulaprofesor, prf_nombreprofesor, prf_apellidoprofesor, prf_loginusuario, prf_cursoprofesor) VALUES ('113088888', 'Ximena', 'mazo', 'Claxima', '750805M');


--
-- TOC entry 1926 (class 0 OID 26657)
-- Dependencies: 1559
-- Data for Name: reporteentregas; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1927 (class 0 OID 26663)
-- Dependencies: 1560
-- Data for Name: reportenotas; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1928 (class 0 OID 26669)
-- Dependencies: 1561
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1929 (class 0 OID 26675)
-- Dependencies: 1562
-- Data for Name: tipousuario; Type: TABLE DATA; Schema: public; Owner: postgres
--



--
-- TOC entry 1930 (class 0 OID 26678)
-- Dependencies: 1563
-- Data for Name: usuario; Type: TABLE DATA; Schema: public; Owner: postgres
--

INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('jean', 'jean', 'estudiante');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('andrea', 'andrea', 'profesor');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('jeantech', 'jeantech', 'administrador');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('Diana', 'diana', 'profesor');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('ricardo', 'eicardo', 'estudiante');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('Claxima', 'mena', 'profesor');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('', 'mary', 'estudiante');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('Marcelita', 'mar', 'estudiante');
INSERT INTO usuario (usu_loginusuario, usu_contrasenausuario, usu_tipousuario) VALUES ('marcelita', 'mar', 'estudiante');


--
-- TOC entry 1864 (class 2606 OID 26715)
-- Dependencies: 1545 1545
-- Name: actividad_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY actividad
    ADD CONSTRAINT actividad_pkey PRIMARY KEY (act_idactividad);


--
-- TOC entry 1866 (class 2606 OID 26717)
-- Dependencies: 1546 1546
-- Name: artefactos_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY artefactos
    ADD CONSTRAINT artefactos_pkey PRIMARY KEY (art_idartefacto);


--
-- TOC entry 1868 (class 2606 OID 26719)
-- Dependencies: 1550 1550
-- Name: curso_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY curso
    ADD CONSTRAINT curso_pkey PRIMARY KEY (cur_idcurso);


--
-- TOC entry 1870 (class 2606 OID 26721)
-- Dependencies: 1551 1551
-- Name: estudiante_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY estudiante
    ADD CONSTRAINT estudiante_pkey PRIMARY KEY (est_codigoestudiante);


--
-- TOC entry 1872 (class 2606 OID 26723)
-- Dependencies: 1552 1552
-- Name: fase_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY fase
    ADD CONSTRAINT fase_pkey PRIMARY KEY (fas_idfase);


--
-- TOC entry 1874 (class 2606 OID 26725)
-- Dependencies: 1553 1553
-- Name: grupotrabajo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY grupotrabajo
    ADD CONSTRAINT grupotrabajo_pkey PRIMARY KEY (grt_idgrupotrabajo);


--
-- TOC entry 1878 (class 2606 OID 26727)
-- Dependencies: 1555 1555
-- Name: key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY metodologia
    ADD CONSTRAINT key PRIMARY KEY (met_id);


--
-- TOC entry 1876 (class 2606 OID 26729)
-- Dependencies: 1554 1554
-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY material
    ADD CONSTRAINT material_pkey PRIMARY KEY (idmaterial);


--
-- TOC entry 1880 (class 2606 OID 26731)
-- Dependencies: 1556 1556
-- Name: modulo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY modulo
    ADD CONSTRAINT modulo_pkey PRIMARY KEY (mod_idmodulo);


--
-- TOC entry 1882 (class 2606 OID 26733)
-- Dependencies: 1557 1557
-- Name: permiso_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY permiso
    ADD CONSTRAINT permiso_pkey PRIMARY KEY (pem_idpermiso);


--
-- TOC entry 1884 (class 2606 OID 26735)
-- Dependencies: 1558 1558
-- Name: profesor_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY profesor
    ADD CONSTRAINT profesor_pkey PRIMARY KEY (prf_cedulaprofesor);


--
-- TOC entry 1886 (class 2606 OID 26737)
-- Dependencies: 1559 1559
-- Name: reporteentregas_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reporteentregas
    ADD CONSTRAINT reporteentregas_pkey PRIMARY KEY (rpe_idreporte);


--
-- TOC entry 1888 (class 2606 OID 26739)
-- Dependencies: 1560 1560
-- Name: reportenotas_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY reportenotas
    ADD CONSTRAINT reportenotas_pkey PRIMARY KEY (rpn_idreportenotas);


--
-- TOC entry 1890 (class 2606 OID 26741)
-- Dependencies: 1561 1561
-- Name: roles_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (rol_idroles);


--
-- TOC entry 1892 (class 2606 OID 26743)
-- Dependencies: 1562 1562
-- Name: tipousuario_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY tipousuario
    ADD CONSTRAINT tipousuario_pkey PRIMARY KEY (tpu_id);


--
-- TOC entry 1894 (class 2606 OID 26745)
-- Dependencies: 1563 1563
-- Name: usuario_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY usuario
    ADD CONSTRAINT usuario_pkey PRIMARY KEY (usu_loginusuario);


--
-- TOC entry 1895 (class 2606 OID 26746)
-- Dependencies: 1545 1552 1871
-- Name: actividad_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY actividad
    ADD CONSTRAINT actividad_fk_1 FOREIGN KEY (act_fase) REFERENCES fase(fas_idfase) ON UPDATE CASCADE;


--
-- TOC entry 1896 (class 2606 OID 26751)
-- Dependencies: 1546 1545 1863
-- Name: artefactos_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY artefactos
    ADD CONSTRAINT artefactos_fk_1 FOREIGN KEY (art_actividad) REFERENCES actividad(act_idactividad) ON UPDATE CASCADE;


--
-- TOC entry 1897 (class 2606 OID 26756)
-- Dependencies: 1551 1553 1873
-- Name: estudiante_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY estudiante
    ADD CONSTRAINT estudiante_fk_1 FOREIGN KEY (est_grupotrabajo) REFERENCES grupotrabajo(grt_idgrupotrabajo) ON UPDATE CASCADE;


--
-- TOC entry 1898 (class 2606 OID 26761)
-- Dependencies: 1551 1563 1893
-- Name: estudiante_fk_2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY estudiante
    ADD CONSTRAINT estudiante_fk_2 FOREIGN KEY (est_loginusuario) REFERENCES usuario(usu_loginusuario) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1899 (class 2606 OID 26766)
-- Dependencies: 1551 1550 1867
-- Name: estudiante_fk_3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY estudiante
    ADD CONSTRAINT estudiante_fk_3 FOREIGN KEY (est_cursoestudiante) REFERENCES curso(cur_idcurso) ON UPDATE CASCADE;


--
-- TOC entry 1900 (class 2606 OID 26771)
-- Dependencies: 1553 1550 1867
-- Name: grupotrabajo_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY grupotrabajo
    ADD CONSTRAINT grupotrabajo_fk_1 FOREIGN KEY (grt_curso) REFERENCES curso(cur_idcurso) ON UPDATE CASCADE;


--
-- TOC entry 1901 (class 2606 OID 26776)
-- Dependencies: 1552 1871 1554
-- Name: material_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY material
    ADD CONSTRAINT material_fk_1 FOREIGN KEY (mat_fasematerial) REFERENCES fase(fas_idfase) ON UPDATE CASCADE;


--
-- TOC entry 1902 (class 2606 OID 26781)
-- Dependencies: 1546 1865 1554
-- Name: material_fk_2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY material
    ADD CONSTRAINT material_fk_2 FOREIGN KEY (mat_artefactomaterial) REFERENCES artefactos(art_idartefacto) ON UPDATE CASCADE;


--
-- TOC entry 1903 (class 2606 OID 26786)
-- Dependencies: 1554 1545 1863
-- Name: material_fk_3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY material
    ADD CONSTRAINT material_fk_3 FOREIGN KEY (mat_actividad) REFERENCES actividad(act_idactividad) ON UPDATE CASCADE;


--
-- TOC entry 1904 (class 2606 OID 26791)
-- Dependencies: 1557 1556 1879
-- Name: permiso_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY permiso
    ADD CONSTRAINT permiso_fk_1 FOREIGN KEY (pem_modulo) REFERENCES modulo(mod_idmodulo) ON UPDATE CASCADE ON DELETE SET DEFAULT;


--
-- TOC entry 1905 (class 2606 OID 26796)
-- Dependencies: 1558 1563 1893
-- Name: profesor_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY profesor
    ADD CONSTRAINT profesor_fk_1 FOREIGN KEY (prf_loginusuario) REFERENCES usuario(usu_loginusuario) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 1906 (class 2606 OID 26801)
-- Dependencies: 1558 1550 1867
-- Name: profesor_fk_2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY profesor
    ADD CONSTRAINT profesor_fk_2 FOREIGN KEY (prf_cursoprofesor) REFERENCES curso(cur_idcurso) ON UPDATE CASCADE;


--
-- TOC entry 1907 (class 2606 OID 26806)
-- Dependencies: 1559 1553 1873
-- Name: reporteentregas_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reporteentregas
    ADD CONSTRAINT reporteentregas_fk_1 FOREIGN KEY (rpe_grupotrabajo) REFERENCES grupotrabajo(grt_idgrupotrabajo) ON UPDATE CASCADE ON DELETE SET DEFAULT;


--
-- TOC entry 1908 (class 2606 OID 26811)
-- Dependencies: 1559 1545 1863
-- Name: reporteentregas_fk_2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reporteentregas
    ADD CONSTRAINT reporteentregas_fk_2 FOREIGN KEY (rpe_actividad) REFERENCES actividad(act_idactividad) ON UPDATE CASCADE ON DELETE SET DEFAULT;


--
-- TOC entry 1909 (class 2606 OID 26816)
-- Dependencies: 1560 1558 1883
-- Name: reportenotas_fk_1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reportenotas
    ADD CONSTRAINT reportenotas_fk_1 FOREIGN KEY (rpn_profesor) REFERENCES profesor(prf_cedulaprofesor) ON UPDATE CASCADE;


--
-- TOC entry 1910 (class 2606 OID 26821)
-- Dependencies: 1560 1553 1873
-- Name: reportenotas_fk_2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reportenotas
    ADD CONSTRAINT reportenotas_fk_2 FOREIGN KEY (rpn_grupotrabajo) REFERENCES grupotrabajo(grt_idgrupotrabajo) ON UPDATE CASCADE;


--
-- TOC entry 1911 (class 2606 OID 26826)
-- Dependencies: 1885 1560 1559
-- Name: reportenotas_fk_3; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY reportenotas
    ADD CONSTRAINT reportenotas_fk_3 FOREIGN KEY (reporteentrega) REFERENCES reporteentregas(rpe_idreporte) ON UPDATE CASCADE;


--
-- TOC entry 1935 (class 0 OID 0)
-- Dependencies: 3
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2010-06-27 23:45:26

--
-- PostgreSQL database dump complete
--

